package com.cjie.ecommerce.dao;

import com.cjie.ecommerce.entity.Category;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
@Slf4j
public class CategoryRepository {
    public List<Category> findAll() {
        List<Category> categoryList = new ArrayList<>();

        //实际是从数据库查询数据的
        for (int i = 0; i < 10; i++) {
            categoryList.add(new Category(String.valueOf(i), "类别" + i));
        }

        return categoryList;
    }
}
